package com.eliza.kotlin.design.creation.prototype.test

/**
 * @version v1.0
 * @ClassName: Citation
 * @Description: TODO(一句话描述该类的功能)
 * @Author: 黑马程序员
 */
class Citation : Cloneable {
    /*//三好学生上的姓名
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }*/
    var stu: Student? = null
    @Throws(CloneNotSupportedException::class)
    public override fun clone(): Citation {
        return super.clone() as Citation
    }

    fun show() {
        println(stu!!.name + "同学：在2020学年第一学期中表现优秀，被评为三好学生。特发此状！")
    }
}

class Student {
    //学生的姓名
    var name: String? = null
    override fun toString(): String {
        return "Student{" +
                "name='" + name + '\'' +
                '}'
    }
}